<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                template="/templates/mainLayout.xhtml">

    <ui:define name="title">vBox-Register Storage</ui:define>
    <ui:define name="menu"/>
    <ui:define name="content">
        <h:form id="mainForm">
            <p:panel header="Register Storage">
                <p:messages id="msgs"/>
                <p:toolbar style="margin-bottom: 10px; margin-top: 10px;">
                    <p:toolbarGroup align="left">  
                        <p:commandButton value="Next" actionListener="#{storageBean.registerAction()}" update="mainForm"/>
                        <p:commandButton value="Cancel" action="#{storageBean.cancelAction()}" immediate="true"/>
                    </p:toolbarGroup>
                    <p:toolbarGroup align="right">  
                        <p:button value="Home" outcome="/home"/>
                    </p:toolbarGroup>
                </p:toolbar>
                
                <h:panelGrid styleClass="panelGrid" columnClasses="ui-state-default labelCol, ui-widget-content" 
                             columns="2" cellpadding="5" width="100%">
                    <h:outputLabel for="provider" style="display: inline; float: right; padding-right: 5px;" value="Provider *" />  
                    <p:selectOneMenu id="provider" value="#{storageBean.provider}" effect="fade">  
                        <f:selectItems value="#{Provider.ALL_PROVIDER_VALUES}" var="provider" itemLabel="#{provider.toString()}" itemValue="#{provider}"/>  
                    </p:selectOneMenu>
                </h:panelGrid>
            </p:panel>
        </h:form>
    </ui:define>
</ui:composition>